package com.ruoyi.pingjiao.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Term {
    private String term;
    private List<TermScore> termScores;

    public Term (String term){
        this.term = term;
        this.termScores = new ArrayList<>(); // 在这里初始化 termScores
    }

    public void addTermScore(TermScore termScore) {
        this.termScores.add(termScore);
    }
}
